<template>
    <div>
        <Header class="head">
            <li slot="top" class="icon-cuo11"> <span class="iconfont icon-cuo1" @click="jump_totals()"></span></li>
            <li slot="top" class="mag"><span class="url"></span>轻芒杂志</li>
      </Header>
        <ul class="dong">
            <li @click="jump_about()" ref="border" :publicinfo="this.$store.state.publicx.publicinfo">
                关注
            </li>
            <li @click="jump_public()" ref="border2">
                广场
            </li>
        </ul>
        <router-view/>
    </div>
</template>

<script>
import Header from "@/components/index_head.vue"

export default {
    components:{
        Header,
        
    },
    methods:{
        jump_totals(){
            this.$router.push("/index")
        },
        jump_about(){
            this.$router.push("/public/about")
            this.$refs.border2.style.borderBottom=""
            this.$refs.border.style.borderBottom="3px solid black"
        },
        jump_public(){
            this.$router.push("/public/public")
            this.$refs.border.style.borderBottom=""
            this.$refs.border2.style.borderBottom="3px solid black"
        }
    },
    mounted(){
        this.$router.push("/public/about")
        this.$refs.border.style.borderBottom="3px solid black";
        this.$store.dispatch("publicinfo")
    }

}
</script>

<style lang="scss" scoped>
.head{
    display: flex;
    background:#ffffff;
    overflow: hidden;
    width: 100%;
    z-index: 3;
    .iconfont{
        font-size: .18rem;
        margin: 0 .13rem;
    }
    .url1{
        margin-top: .03rem;
        margin: 0 .15rem;
     
    }
}
.dong{
    display: flex;
    box-sizing: border-box;
    padding: 0 .1rem;
    li{
        text-align: center;
        width: 50%;
        font-size: .14rem;
        padding: .12rem 0;
        // border-bottom: 2px solid black;

    }
}


</style>